package linker.list;

import org.jivesoftware.smackx.filetransfer.FileTransferRequest;

import linker.account.Account;
import linker.file.FileManager;

/**
 * 
 * @version linker 0.93
 * @author Jianfeng jianfeng.linker@gmail.com
 * 
 */
public class FileRecieveMessage extends DefaultListItem {

	private String fileName;

	public FileRecieveMessage(FileTransferRequest request) {
		fileName = request.getFileName();

		FileManager.addRecieveFile(request);

	}

	public void doubleClick() {
		FileManager.getFileManager().setVisible(true);

		Account.removeMessage(this);
	}

	public String toString() {
		return "Recieve " + fileName;
	}

}
